package com.xh.entity;

import java.util.List;

public class Subject {
    private Integer id;
    private String name;
    private Integer grade;


    private List<Subject> students;
    public Subject(){}
    public Subject(Integer id, String name, Integer grade) {
        this.id = id;
        this.name = name;
        this.grade = grade;
    }

    public List<Subject> getSubjects() {
        return students;
    }

    public void setSubjects(List<Subject> subjects) {
        this.students = subjects;
    }

    @Override
    public String toString() {
        return "Subject{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", grade=" + grade +
                '}';
    }


    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getGrade() {
        return grade;
    }

    public void setGrade(Integer grade) {
        this.grade = grade;
    }
}
